define(function (require, exports, module) {
    require('../../../../mypublic/css/common.less');
    require('../../../../mypublic/css/index.less');

    require("jquery");
    var angular = require('angular');
    require('angular-route');
    require('./edit_view_inc/base-ctrl');
    require('./edit_view_inc/receivable-ctrl');
    require('../authorize');
    require('./contract-menu-view');
    require('../side');

    angular.module('myContractEditApp', ['ngRoute', 'ContractBase', 'ContractReceivable'])
        .service('userAuth', ['$http', ($http) => {
            return {
                reqUserAuth(){
                    return $http.get(
                        '/api/index.php?r=user-auth/get-user-all-auth'
                    );
                }
            };
        }])
        .config(['$routeProvider', function ($routeProvider) {
            $routeProvider
                .when('/base', {
                    template: require('../../../../contract/edit_view_inc/base.html')
                })
                .when('/receivable', {
                    template: require('../../../../contract/edit_view_inc/receivable.html')
                });
        }])
        .controller('appAuthList', ['$rootScope', 'userAuth', function ($rootScope, userAuth) {

        }])
        .run(function ($routeParams, contractMenuService) {
            contractMenuService.menuInit();
        });

    angular.bootstrap(document, ['myContractEditApp']);
});
